package com.jxc.jxc01.yk.service;



import com.jxc.jxc01.yk.dao.CustomerDaoImpl;
import com.jxc.jxc01.yk.dao.ICustomerDao;
import com.jxc.jxc01.yk.entity.Customer;
import com.jxc.jxc01.yk.entity.PageHelper;

import java.util.List;

public class CustomerServiceImpl implements ICustomerService {
    ICustomerDao customerDao = new CustomerDaoImpl();
    /**
     * 增加客户信息
     */
    public boolean addCustomer(Customer customer){
        return customerDao.addCustomer(customer);
    }
    /**
     * 查询客户信息
     */
    public List<Customer> findCustomerList(PageHelper<Customer> pageHelper){
        return customerDao.findCustomerList(pageHelper);
    }

    /**根据客户姓名查找某一条记录*/
    public List<Customer> findOneOfCustomer(String customername){
        return customerDao.findOneOfCustomer(customername);
    }

    /**
     * 删除客户信息
     */
    public boolean deleteCustomer(int id){
        return customerDao.deleteCustomer(id);
    }

    /**
     * 修改客户信息
     */
    public boolean updateCustomer(Customer customer){
        return customerDao.updateCustomer(customer);
    }
}
